from flask import Flask
import schedule
import time
import threading

app = Flask(__name__)

# 你的爬虫程序代码
def check_website():
    # 你的爬虫逻辑
    pass

# 定时任务
def run_scheduler():
    schedule.every(10).minutes.do(check_website)
    while True:
        schedule.run_pending()
        time.sleep(1)

# 启动定时任务
threading.Thread(target=run_scheduler).start()

@app.route('/')
def health_check():
    return "服务正常运行！"

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=80)